Optimal. Leaf size=185 \[ \frac{x^3 (4 x (b B-2 a D)-5 a C+A b)}{8 a b^2 \left (a+b x^2\right )}-\frac{3 x (A b-5 a C)}{8 a b^3}+\frac{3 (A b-5 a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{8 \sqrt{a} b^{7/2}}-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-x (A b-a C)\right )}{4 a b \left (a+b x^2\right )^2}-\frac{x^2 (b B-3 a D)}{2 a b^3}+\frac{(b B-3 a D) \log \left (a+b x^2\right )}{2 b^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.338183, antiderivative size = 185, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {1804, 801, 635, 205, 260} \[ \frac{x^3 (4 x (b B-2 a D)-5 a C+A b)}{8 a b^2 \left (a+b x^2\right )}-\frac{3 x (A b-5 a C)}{8 a b^3}+\frac{3 (A b-5 a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{8 \sqrt{a} b^{7/2}}-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-x (A b-a C)\right )}{4 a b \left (a+b x^2\right )^2}-\frac{x^2 (b B-3 a D)}{2 a b^3}+\frac{(b B-3 a D) \log \left (a+b x^2\right )}{2 b^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1804
Rule 801
Rule 635
Rule 205
Rule 260
Rubi steps
\begin{align*} \int \frac{x^4 \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^3} \, dx &=-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}-\frac{\int \frac{x^3 \left (-4 a \left (B-\frac{a D}{b}\right )+(A b-5 a C) x-4 a D x^2\right )}{\left (a+b x^2\right )^2} \, dx}{4 a b}\\ &=-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}+\frac{x^3 (A b-5 a C+4 (b B-2 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac{\int \frac{x^2 (-3 a (A b-5 a C)-8 a (b B-3 a D) x)}{a+b x^2} \, dx}{8 a^2 b^2}\\ &=-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}+\frac{x^3 (A b-5 a C+4 (b B-2 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac{\int \left (-\frac{3 a (A b-5 a C)}{b}-\frac{8 a (b B-3 a D) x}{b}+\frac{3 a^2 (A b-5 a C)+8 a^2 (b B-3 a D) x}{b \left (a+b x^2\right )}\right ) \, dx}{8 a^2 b^2}\\ &=-\frac{3 (A b-5 a C) x}{8 a b^3}-\frac{(b B-3 a D) x^2}{2 a b^3}-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}+\frac{x^3 (A b-5 a C+4 (b B-2 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac{\int \frac{3 a^2 (A b-5 a C)+8 a^2 (b B-3 a D) x}{a+b x^2} \, dx}{8 a^2 b^3}\\ &=-\frac{3 (A b-5 a C) x}{8 a b^3}-\frac{(b B-3 a D) x^2}{2 a b^3}-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}+\frac{x^3 (A b-5 a C+4 (b B-2 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac{(3 (A b-5 a C)) \int \frac{1}{a+b x^2} \, dx}{8 b^3}+\frac{(b B-3 a D) \int \frac{x}{a+b x^2} \, dx}{b^3}\\ &=-\frac{3 (A b-5 a C) x}{8 a b^3}-\frac{(b B-3 a D) x^2}{2 a b^3}-\frac{x^4 \left (a \left (B-\frac{a D}{b}\right )-(A b-a C) x\right )}{4 a b \left (a+b x^2\right )^2}+\frac{x^3 (A b-5 a C+4 (b B-2 a D) x)}{8 a b^2 \left (a+b x^2\right )}+\frac{3 (A b-5 a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{8 \sqrt{a} b^{7/2}}+\frac{(b B-3 a D) \log \left (a+b x^2\right )}{2 b^4}\\ \end{align*}
Mathematica [A] time = 0.116181, size = 139, normalized size = 0.75 \[ \frac{\frac{2 a \left (a^2 D-a b (B+C x)+A b^2 x\right )}{\left (a+b x^2\right )^2}+\frac{-12 a^2 D+8 a b B+9 a b C x-5 A b^2 x}{a+b x^2}+\frac{3 \sqrt{b} (A b-5 a C) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a}}+4 (b B-3 a D) \log \left (a+b x^2\right )+8 b C x+4 b D x^2}{8 b^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.01, size = 235, normalized size = 1.3 \begin{align*}{\frac{D{x}^{2}}{2\,{b}^{3}}}+{\frac{Cx}{{b}^{3}}}-{\frac{5\,A{x}^{3}}{8\,b \left ( b{x}^{2}+a \right ) ^{2}}}+{\frac{9\,C{x}^{3}a}{8\,{b}^{2} \left ( b{x}^{2}+a \right ) ^{2}}}+{\frac{Ba{x}^{2}}{{b}^{2} \left ( b{x}^{2}+a \right ) ^{2}}}-{\frac{3\,D{x}^{2}{a}^{2}}{2\,{b}^{3} \left ( b{x}^{2}+a \right ) ^{2}}}-{\frac{3\,aAx}{8\,{b}^{2} \left ( b{x}^{2}+a \right ) ^{2}}}+{\frac{7\,{a}^{2}Cx}{8\,{b}^{3} \left ( b{x}^{2}+a \right ) ^{2}}}+{\frac{3\,{a}^{2}B}{4\,{b}^{3} \left ( b{x}^{2}+a \right ) ^{2}}}-{\frac{5\,{a}^{3}D}{4\,{b}^{4} \left ( b{x}^{2}+a \right ) ^{2}}}+{\frac{\ln \left ( b{x}^{2}+a \right ) B}{2\,{b}^{3}}}-{\frac{3\,\ln \left ( b{x}^{2}+a \right ) aD}{2\,{b}^{4}}}+{\frac{3\,A}{8\,{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{15\,aC}{8\,{b}^{3}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 23.3071, size = 357, normalized size = 1.93 \begin{align*} \frac{C x}{b^{3}} + \frac{D x^{2}}{2 b^{3}} + \left (- \frac{- B b + 3 D a}{2 b^{4}} - \frac{3 \sqrt{- a b^{9}} \left (- A b + 5 C a\right )}{16 a b^{8}}\right ) \log{\left (x + \frac{8 B a b - 24 D a^{2} - 16 a b^{4} \left (- \frac{- B b + 3 D a}{2 b^{4}} - \frac{3 \sqrt{- a b^{9}} \left (- A b + 5 C a\right )}{16 a b^{8}}\right )}{- 3 A b^{2} + 15 C a b} \right )} + \left (- \frac{- B b + 3 D a}{2 b^{4}} + \frac{3 \sqrt{- a b^{9}} \left (- A b + 5 C a\right )}{16 a b^{8}}\right ) \log{\left (x + \frac{8 B a b - 24 D a^{2} - 16 a b^{4} \left (- \frac{- B b + 3 D a}{2 b^{4}} + \frac{3 \sqrt{- a b^{9}} \left (- A b + 5 C a\right )}{16 a b^{8}}\right )}{- 3 A b^{2} + 15 C a b} \right )} + \frac{6 B a^{2} b - 10 D a^{3} + x^{3} \left (- 5 A b^{3} + 9 C a b^{2}\right ) + x^{2} \left (8 B a b^{2} - 12 D a^{2} b\right ) + x \left (- 3 A a b^{2} + 7 C a^{2} b\right )}{8 a^{2} b^{4} + 16 a b^{5} x^{2} + 8 b^{6} x^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19736, size = 212, normalized size = 1.15 \begin{align*} -\frac{3 \,{\left (5 \, C a - A b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{8 \, \sqrt{a b} b^{3}} - \frac{{\left (3 \, D a - B b\right )} \log \left (b x^{2} + a\right )}{2 \, b^{4}} + \frac{D b^{3} x^{2} + 2 \, C b^{3} x}{2 \, b^{6}} - \frac{10 \, D a^{3} - 6 \, B a^{2} b -{\left (9 \, C a b^{2} - 5 \, A b^{3}\right )} x^{3} + 4 \,{\left (3 \, D a^{2} b - 2 \, B a b^{2}\right )} x^{2} -{\left (7 \, C a^{2} b - 3 \, A a b^{2}\right )} x}{8 \,{\left (b x^{2} + a\right )}^{2} b^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]